function [s] = softMaxPredict(x,theta)

% x is the new input feature matrix (m by n-1)
% theta is (nStates by n)

m = size(x,1);
X = horzcat(ones(m,1),x);
s = ones(m,1);

for i=1:m
    xi = X(i,:);
    v = theta*xi';
    [~,I] = max(v); %replaced C by tilda since it was unused
    s(i) = I;
end

end